import http from '@/utils/request';

/**
 * 获取教练列表
 * @param {Object} params 查询参数
 * @returns {Promise}
 */
export const getCoaches = (params = {}) => {
  return http.get('/coach', params);
};

/**
 * 获取教练详情
 * @param {Number} id 教练ID
 * @returns {Promise}
 */
export const getCoach = (id) => {
  return http.get(`/coach/${id}`);
};

/**
 * 评价教练
 * @param {Number} id 教练ID
 * @param {Object} data 评价数据
 * @returns {Promise}
 */
export const rateCoach = (id, data) => {
  return http.post(`/coach/${id}/rate`, data);
};